<%--
    Document   : Register
    Created on : Sep 29, 2012, 4:34:35 PM
    Author     : MinhThang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" errorPage="error.jsp"%>
<%@page import="org.apt.Bean.SeminarEntities"%>
<%@page import="com.myapp.DAO.SeminarDao"%>
<%@page import="org.apt.Bean.LectureEventEntities"%>
<%@page import="com.myapp.DAO.LectureEventDao"%>
<%@page import="java.util.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="description" content="website description" />
        <meta name="keywords" content="website keywords, website keywords" />
        <meta http-equiv="content-type" content="text/html; charset=windows-1252" />
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine&amp;v1#" />
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" />
        <link rel="stylesheet" type="text/css" href="style/style.css" />
        <style >
            * {font-family:Arial, Helvetica, sans-serif;
               font-size:10pt;}
            #titleRegistedEvent{
                font-size: 20px;
                text-indent: 10px;
                color: #5C542F;
                text-decoration: underline;
                text-align: left;
            }
            .hrclass{
                color: red;
                height: 0.1em;
                width: 100%;
                text-align: center;
            }
            a:hover{
                color: blue;
            }
        </style>
        <title>Member Event</title>
    </head>
    <body>
        <div>
            <div><%@include file="UserTemplate/Banner.jsp" %></div>
            <div id="site_content">
                <form action="MemberEdit.jsp"   method="post"  name="fmember" id="fmember">
                    <div id="content">
                        <div id="tableRegiter">
                            <%
                                        String username = "";
                                        try {
                                            if (session.getAttribute("UserID") != null) {
                                                username = session.getAttribute("UserID").toString();
                                            }
                                        } catch (Exception ex) {
                                            response.sendRedirect("error.jsp");
                                        }

                                        List<SeminarEntities> listseminarAprrove = SeminarDao.GetSeminarMemberRegister(username, "True");
                                        List<SeminarEntities> listseminarNotAprrove = SeminarDao.GetSeminarMemberRegister(username, "False");
                                        List<LectureEventEntities> listLectureEventAprrove = LectureEventDao.getLectureEventMemberRegister(username, "True");
                                        List<LectureEventEntities> listLectureEventNotAprrove = LectureEventDao.getLectureEventMemberRegister(username, "False");
                                        if (listseminarAprrove != null) {%>
                            <br><p id="titleRegistedEvent">List Seminar Had Been Approve</p>
                            <table  class="tableRegiter" style="width: 99.5%">
                                <%
                                                                            for (SeminarEntities seminar1 : listseminarAprrove) {
                                %>
                                <tr>
                                    <td><a style="color: blue;font-size: 13px;padding-left: 20px" href="LectureEventDetails.jsp?id=<%=seminar1.getSeminarID()%>"><%=seminar1.getSeminarName()%></a></td>
                                </tr>
                                <%}%>
                            </table>
                            <%}
                                        if (listseminarNotAprrove != null) {
                            %>
                            <br> <p id="titleRegistedEvent">List Seminar Not Approve</p>
                            <table  class="tableRegiter" style="width: 99.5%">
                                <%                                for (SeminarEntities seminar2 : listseminarNotAprrove) {
                                %>
                                <tr>
                                    <td><a style="color: blue;font-size: 13px;padding-left: 20px" href="LectureEventDetails.jsp?id=<%=seminar2.getSeminarID()%>"><%=seminar2.getSeminarName()%></a></td>
                                </tr>
                                <%}%>
                            </table>
                            <%}
                                        if (listLectureEventAprrove != null) {
                            %>
                            <br><p id="titleRegistedEvent" >List LectureEvent Had Been Approve</p>
                            <table  class="tableRegiter" style="width: 99.5%">
                                <%                                for (LectureEventEntities lecture1 : listLectureEventAprrove) {
                                %>
                                <tr>
                                    <td><a style="color: blue;font-size: 13px;padding-left: 20px" href="SeminarDetails.jsp?id=<%=lecture1.getEventID()%>"><%=lecture1.getEventName()%></a></td>
                                </tr>
                                <%}%>
                            </table>
                            <%}
                                        if (listLectureEventNotAprrove != null) {
                            %>
                            <br><p id="titleRegistedEvent" align="center">List LectureEvent Not Approve</p>
                            <table  class="tableRegiter" style="width: 99.5%">
                                <%                                for (LectureEventEntities lecture2 : listLectureEventNotAprrove) {
                                %>
                                <tr>
                                    <td><a style="color: blue;font-size: 13px;padding-left: 20px" href="SeminarDetails.jsp?id=<%=lecture2.getEventID()%>"><%=lecture2.getEventName()%></a></td>
                                </tr>
                                <%}%>
                            </table>
                            <%}%>
                        </div>
                    </div>
                </form>
                <div><%@include file="UserTemplate/MenuRight.jsp" %></div>
            </div>
            <div></div>
            <div><%@include file="UserTemplate/Footer.jsp" %></div>
        </div>
    </body>
</html>